package com.grape.constants;

import java.util.HashMap;
import java.util.Map;

/**
 * @author  putao
 * @email   2628279194@qq.com
 */
public abstract class Constants {


    public static final Map<Integer, String> WEEK_MAP = new HashMap<>();

    /** 会员时间类型 月份 */
    public static final String MEMBER_TIME_TYPE_MONTH = "month";

    /** 会员时间类型 季度 */
    public static final String MEMBER_TIME_TYPE_QUARTER = "quarter";

    /** 会员时间类型 年 */
    public static final String MEMBER_TIME_TYPE_YEAR = "year";

    /** 会员时间类型 永久 */
    public static final String MEMBER_TIME_TYPE_PERMANENT = "permanent";

    static {
        WEEK_MAP.put(1, "周日");
        WEEK_MAP.put(2, "周一");
        WEEK_MAP.put(3, "周二");
        WEEK_MAP.put(4, "周三");
        WEEK_MAP.put(5, "周四");
        WEEK_MAP.put(6, "周五");
        WEEK_MAP.put(7, "周六");
    }

    /** 星期 */
    public static final String[] weeks = { "周日", "周一", "周二", "周三", "周四", "周五", "周六" };

    public static final String APPLICATION_JSON_VALUE = "application/json;charset=UTF-8";


    public static final String INSERT_VALUE_REPEAT = "插入操作时数据重复";

    public static final String REFLECT_CHECK_EMPTY_COLUMN_ARRAY_EMPTY = "反射检查字段为空";

    public static final String USER_ID = "user_id";

    public static final String NAME = "name";

    public static final String USERNAME = "username";

    public static final String IP = "ip";

    public static final String USER_AVATAR = "user_avatar";

    public static final String STATUS = "status";

    public static final String SYSTEM_USER_NAME = "admin";

    /**操作记录的单位 毫秒*/
    public static final String OPERATION_TIME_UNIT = "ms";

    public static final String PARTNER_ID = "parent_id";

    public static final String IS_LOGGED = "is_logged";

    public static final String DEFAULT_USERNAME_PREFIX = "萄友";

    public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";

    /** 电子账户 */
    public static final String ACCOUNT_TYPE_ELECTRONIC = "electronicAccount";

    /** 金融账户 */
    public static final String ACCOUNT_TYPE_FINANCIAL = "financialAccount";

    /** 默认账本名字 */
    public static final String ACCOUNT_BOOK_DEFAULT_NAME = "默认账本";


    /**************************************************************** 定时任务常量 ********************************************************************************/
    public static final String JOB_RESULT_SUCCESS = "success";
    public static final String JOB_RESULT_FAIL = "fail";
    /**************************************************************** 聊天常量 ********************************************************************************/
    public static final String CHAT_PHONE = "phone";
    public static final String CHAT_PC = "pc";
    /**************************************************************** websocket常量 ********************************************************************************/
    public static final String TYPE_PC = "PC";
    public static final String TYPE_PHONE = "PHONE";
    public static final String TYPE_QR_CODE = "QR_CODE";
    /**************************************************************** 通知常量 ********************************************************************************/
    public static final String QR_CODE_KEY = "key";
    public static final String QR_CODE_KEY_ID = "id";
    public static final String QR_CODE_QR_CODE = "qr_code";
    public static final String QR_CODE_LOGIN = "qr_code_login";
    public static final String QR_CODE_DATA = "data";

    public static final String NOTICED_USER_ID = "noticed_user_id";
    public static final String noticed_username = "noticed_username";
    public static final String NOTICED_USER_AVATAR = "noticed_user_avatar";
    public static final String TYPE_LIKE = "like";
    public static final String TYPE_REPLY = "reply";
    public static final String TYPE_SYSTEM = "system";
    public static final String TYPE_COLLECT = "collect";
    public static final String POSITION_TOP = "top";
    public static final String POSITION_BOTTOM = "bottom";
    /**************************************************************** 实体类数据库字段 ********************************************************************************/
    public static final String ID = "id";
    public static final String TYPE = "type";
    public static final String SIGN = "sign";
    public static final String POSITION = "position";
    public static final String CREATE_TIME = "create_time";
    public static final String CREATE_ID = "create_id";
    public static final String MODIFY_TIME = "modify_time";
    public static final String MODIFY_ID = "modify_id";
    public static final String POST_ID = "post_id";
    public static final String COMMENT_ID = "comment_id";
    public static final String PHONE = "phone";
    /**************************************************************** 账本常量 ********************************************************************************/
    public static final String TIME_HOUR = "h";
    public static final String ACCOUNT_BOOK_ID = "account_book_id";
    public static final String ACCOUNT_ID = "account_id";
    public static final String CATEGORY_ID = "category_id";
    public static final String CATEGORY_TYPE_PAY = "pay";
    public static final String CATEGORY_TYPE_INCOME = "income";
    public static final String CATEGORY_TYPE_PAY_CN = "支出";
    public static final String CATEGORY_TYPE_INCOME_CN = "收入";
    public static final String COMPARE_UP = "up";
    public static final String COMPARE_DOWN = "down";
    /**************************************************************** 消息常量 ********************************************************************************/
    public static final String RECEIVE_USER_ID = "receive_user_id";
    public static final String RECEIVE_USERNAME = "receive_username";
    public static final String RECEIVE_USER_AVATAR = "receive_user_avatar";

    /**************************************************************** 数据库相关常量 ********************************************************************************/
    public static final String LIMIT_ONE = "limit 1";

    /**
     * 一个字符串长度 中文42，英文30
     */
    public static final int CHAR_LENGTH_OF_CHINESE = 42;
    public static final int CHAR_LENGTH_OF_ENGLISH = 30;
    /**
     * ,
     */
    public static final String NULL = "";
    /**
     * ,
     */
    public static final String COMMA = ",";
    /**
     * :
     */
    public static final String M = ":";
    /**
     * '
     */
    public static final String SINGLE_QUOTATION_MARK = "'";
    /**
     * [
     */
    public static final String SQUARE_BRACKETS_LEFT = "[";
    /**
     * ]
     */
    public static final String SQUARE_BRACKETS_RIGHT = "]";
    /**
     * SPACE
     */
    public static final String SPACE = " ";
    /**
     * .
     */
    public static final String D = ".";
    /**
     * -
     */
    public static final String H = "-";
    /**
     * success
     */
    public static final String SUCCESS = "success";
    /**
     * entities
     */
    public static final String ENTITIES = "entities";
    /**
     * ?
     */
    public static final String QUESTION_MARK = "?";
    /**
     * &
     */
    public static final String AND = "&";
    /**
     * success
     */
    public static final String RETURN = "return";
    /**
     * OK
     */
    public static final String OK = "ok";
    /**
     * data
     */
    public static final String DATA = "data";
    /**
     * X
     */
    public static final String DIAGONAL = "/";
    /**
     * 超时时间
     */
    public static final int TIMEOUT = 100000;
    /**
     * -1
     */
    public static final String NO_STR = "-1";
    /**
     * 0
     */
    public static final String ZERO_STR = "0";
    /**
     * 1
     */
    public static final String ONE_STR = "1";
    /**
     * 1
     */
    public static final int INT_ONE = 1;
    /**
     * 2
     */
    public static final String TWO_STR = "2";
    /**
     * -2
     */
    public static final String NEGATIVE_TWO_STR = "-2";
    /**
     * 0
     */
    public static final int ZERO_INT = 0;
    /**
     * 4
     */
    public static final int FOUR = 4;
    /**
     * NULL
     */
    public static final Object STR_NULL = null;


    /**
     * 正常
     */
    public static final String NORMAL = "normal";
    /**
     * 异常
     */
    public static final String ABNORMAL = "abnormal";
    /**
     * token 头
     */
    public static final String TOKEN_HEADER = "Authorization";
    /**
     * get请求
     */
    public static final String REQUEST_TYPE_GET = "get";
    /**
     * post请求
     */
    public static final String REQUEST_TYPE_POST = "post";
    /**
     * 删除标记字段
     */
    public static final String DEL_FLAG = "del_flag";
    /**
     * 插入操作
     */
    public static final String OPERATION_TYPE_INSERT = "insert";
    /**
     * 插入操作
     */
    public static final String OPERATION_TYPE_UPDATE = "update";
    /**
     * 插入操作
     */
    public static final String OPERATION_TYPE_DELETE = "delete";
    /**
     * 拦截请求结果 成功
     */
    public static final String OPERATION_RESULT_SUCCESS = "success";
    /**
     * 拦截请求结果 失败
     */
    public static final String OPERATION_RESULT_FAIL = "fail";
    /**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";
    /**
     * 类型：帖子
     */
    public static final String TYPE_POST = "post";
    /**
     * 图片类型
     */
    public static final String IMAGE_JPEG = "image/jpeg";

    /**
     * https
     */
    public static final String HTTPS = "https://";
    /**
     * 路径前缀
     */
    public static final String IMG_NAME = "img";
    /**
     * http
     */
    public static final String HTTP = "http://";
    /**
     * png
     */
    public static final String PNG = "png";
    /** JPEG */
    public static final String JPEG = "jpeg";
    /** JPG */
    public static final String JPG = "jpg";
    /** 斜杠 */
    public static final String SLASH = "/";
    /** fileUtils */
    public static final String UPLOAD_LOCAL_UTILS_NAME_FILE_UTILS = "fileUtils";
    /**
     * minioUtils
     */
    public static final String UPLOAD_LOCAL_UTILS_NAME_MINIO_UTILS = "minioUtils";
    /**
     * uuid
     */
    public static final String TOKEN_UUID = "uuid";
    /** Authorization */
    public static final String TOKEN_AUTHORIZATION = "Authorization";
    /** env */
    public static final String TOKEN_ENV = "env";
    /** userId */
    public static final String TOKEN_USERID = "userId";
    /** 字符编码 utf-8 */
    public static final String ENCODING = "UTF-8";

    /** 正常 状态 */
    public static final String STATUS_NORMAL = "0";

    /** 错误 状态 */
    public static final String STATUS_ERROR = "1";

    public static final String USER_CONTEXT_ATTRIBUTE_KEY = "USER_CONTEXT_ATTRIBUTE_KEY";


}
